package com.gg.star.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gg.dao.StarMapper;

import povos.StarFruitPovo;

@Service
public class StarService {
@Autowired
private StarMapper starMapper;
public List<StarFruitPovo> showAllStarsByUid(String uid ){
	return starMapper.selectStarFruitPovosByUid(uid);
	
}
public void removeStarBySid(String sid) {
	starMapper.deleteStarBySid(sid);
	
}
public void changeCountBySid(String sid, int number) {
	starMapper.updateCountBySid(sid, number);
	
}
public StarFruitPovo getStarFruitPovoByUidAndFid(String fid, String uid) {
	return starMapper.selectStarFruitPovoByUidAndFid(fid,uid);
}
public void addStar(String uid, Integer fid) {
	starMapper.insertStar(uid,fid);
	
}
}
